/**
 * xaseTabs Extension – History
 * ************************************************************************************************************** 
 * Saves tab-state in URL for history and bookmark functionality
 * Requires jQuery Address Plugin: http://www.asual.com/jquery/address/
 *                                     
 * Version: 		0.2.0
 * Documentation:	http://xasetabs.noelboss.ch/
 * Download:		http://code.google.com/p/xasetabs
 * Source:			svn checkout http://xasetabs.googlecode.com/svn/trunk/ xasetabs-read-only
 *
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * © 2010 by Noël Bossart                                 
 */
;var xaseTabsExtensions=xaseTabsExtensions||{};(function(a){xaseTabsExtensions.history=function(b){var c=!1;return b.setupTabs.unshift(function(b){this.bind("setupTabs."+b.namespace,function(d,e){if(d.isDefaultPrevented()||d.isPropagationStopped())return;var f=a(this),g=f.data("$tabs"),h=function(a){c=!0;var d=unescape(a.parameters[b.namespace]),e=g.filter(":contains("+d+")");d&&e.addClass(b.activeClass)},i=function(a){var c=unescape(a.parameters[b.namespace]);c?g.filter(":contains("+c+")").click():g.eq(0).click()};a.address.init(h),a.address.externalChange(i)})}),b.activate.unshift(function(b){this.bind("activate."+b.namespace,function(d,e){if(d.isDefaultPrevented()||d.isPropagationStopped())return;var f=a.trim(a(e).text()),g=a(this);c&&a.address.parameter(b.namespace,f)})}),b}})(jQuery)